package com.pti.usermanager.dao.impl;

import com.pti.usermanager.dao.api.IconDao;
import com.pti.usermanager.dao.mapper.IconMapper;
import com.pti.usermanager.dao.po.IconPo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName: IconServiceImpl
 * @Author: liumengyao
 * @Description: 数据实现层
 * @Date: 2019/3/5
 */
@Repository
public class IconDaoImpl implements IconDao{

    @Autowired
    private IconMapper iconMapper;

    @Override
    public List<IconPo> findAll(Integer iconTyp) {
        return iconMapper.findAll(iconTyp);
    }

    @Override
    public List<IconPo> findBranchData(Long usrId,Integer iconTyp) {
        return iconMapper.findBranchData(usrId,iconTyp);
    }

    @Override
    public Long findorgIdByUsrId(Long userId,Integer orgType) {
        return iconMapper.findorgIdByUsrId(userId,orgType);
    }

    @Override
    public List<IconPo> findIconByOrgId(Long orgId,Integer iconTyp) {
        return iconMapper.findIconByOrgId(orgId,iconTyp);
    }

    @Override
    public void moveIcon(Long usrId, Long iconId, Integer sort) {
        iconMapper.moveIcon(usrId,iconId,sort);
    }

    @Override
    public void delIconByUsrId(Long usrId,Integer iconTyp) {
        iconMapper.delIconByUsrId(usrId,iconTyp);
    }


}
